<?php
namespace Common\Model;

class ZonePlanStatsModel extends ZoneStatsModel {
    protected $tableName  = 't_zone_stats';
    private   $tableName2 = 'v_zone_plan_stats';
    protected $pk         = 'id';


    /**
     * getTableName
     * 根据$uid, $day返回表格完整名称
     *
     * @param mixed $uid
     * @param mixed $day
     * @return void
     */
    public function getTableName($uid, $day) {
        $timestamp  = strtotime($day);
        $tableIndex = $uid % self::TABLE_PARTITION_NUM;

        return 'd' . date('Ymd', $timestamp) . '.'. $this->tableName2 . '_' . $tableIndex;
    }

}
